<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<?php $this->load->view('layout/Header'); ?>
	    <?php $this->load->view('layout/Modal'); ?>
	    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>Resources/Styles/Shop_Cart.css" />
	    <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>Resources/Styles/Payment.css" />
		<title>DotA 2 Shop</title>
	    
	</head>
	<body>

		<!-- Menu bar -->

		<?php $this->load->view('layout/Navbar'); ?>

		<!-- End Menu -->


		<!-- COntent -->
		<div class="row">
			<div class="col-md-2">
			</div>

			<div class="col-md-8">
					<table>
						<thead>
							<tr>
								<td colspan="4"><h3>My History Shopping Cart</h3></td>
							</tr>
							<tr class="tableheader">
								<td>ITEM</td>
								<td width="15%">PRICE</td>
								<td width="5%">QUANTITY</td>
								<td>SUB TOTAL</td>
							</tr>
						</thead>

						<tbody>
						<?php if(is_array($invoice_details)): ?>
							<?php foreach ($invoice_details as $items): ?>
								<tr class="iteminfo">
									<td>
										<a href="#">
						                    <div class='row'>
						                    	<div class="col-md-4">
							                    	<div class="Image-item">
								         	           	<img class="productimage" src="<?php print $items->ITEM_IMAGE; ?>">
							                    	</div>
						                    	</div>
						                    	<div class="col-md-8">
							                    	<div class="Info-item">
									                    <p class="productinfo" id="nameitem"><small><b><?php print $items->ITEM_NAME; ?></b></small></p>
								                    </div>
							                    </div>
						                    </div>
					                    </a>
									</td>
									<td>
										<p class="productprice"><b><small>$<?php print $items->PRICE_MARKET; ?> USD</small></b></p>
									</td>
									<td>
									    <div class="input-group">
									    	<?php echo form_input(array('readonly' =>'readonly', 'class' => 'input-number', 'id' => 'qty','name' => '_qty', 'value' => $items->QUANTITY, 'maxlength' => '3', 'size' => '5', 'style'=>"text-align:center; color:black;")); ?>
									    </div>
									</td>
									<td>
										<p class="productprice"><b><small>$<?php print $items->PRICE_MARKET; ?> USD</small></b></p>
									</td>
								</tr>
							<?php endforeach; ?>
						<?php endif; ?>
						</tbody>
					</table>
				<?php echo form_close(); ?>
			</div>

			<div class="col-md-2">
			</div>
		</div>	


		<!-- Footer -->
		<?php $this->load->view('layout/Footer'); ?>

	</body>

	<script type="text/javascript">
		$(".input-number").keydown(function (e) {
		    // Allow: backspace, delete, tab, escape, enter and .
		    if ($.inArray(e.keyCode, [46, 8, 9, 27, 13, 190]) !== -1 ||
		         // Allow: Ctrl+A
		        (e.keyCode == 65 && e.ctrlKey === true) || 
		         // Allow: home, end, left, right
		        (e.keyCode >= 35 && e.keyCode <= 39)) {
		             // let it happen, don't do anything
		             return;
		    }
		    // Ensure that it is a number and stop the keypress
		    if ((e.shiftKey || (e.keyCode < 48 || e.keyCode > 57)) && (e.keyCode < 96 || e.keyCode > 105)) {
		        e.preventDefault();
		    }
		});
	</script>
</html>